<table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
<tr>
    <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
    <td class="block_header">{language text="friends_new_requests"}</td>
</tr>
</table>

{if $aProcessed}
    <div style="padding:10px;font-size:10pt;" class="color">
        {if 'approve'==$sAction}
        {language text="you_have_just_approved_the_followin"}
        {else}
        {language text="you_have_just_denied_the_following"}:
        {/if}
        <br /><br />
        {foreach from=$aProcessed item=aProcReq}
        <div style="padding-bottom:4px;"><a href="{url link='public.user' name=$aProcReq.user}">{$aProcReq.user}</a></div>
        {/foreach}
    </div>
    {elseif $aRequests}
    <div style="font-size:10pt;" class="color"> {language text="below_is_a_list_of_your_new_friends"} </div>
    <br />
    {messages block="FriendRequests"}
    <br />
    {str_replace text="`viewing_apaging_fromrow_apaging_tor`" aPaging_fromRow="`$aPaging.fromRow`" aPaging_toRow="`$aPaging.toRow`" aPaging_totalRows="`$aPaging.totalRows`" }<br /><br />
    <br /><br />
    {include file="$sRootPath/_blocks/pager.html"}
    <table style="width:100%;" cellpadding="0">
    <tr>
    <td>
        <form action="{$sUrl}" method="post" name="myform">
        <table style="width:100%;" cellpadding="5" cellspacing="0">
            {foreach from=$aRequests item=aRequest name=requests}
            <tr class="{if $smarty.foreach.requests.iteration % 2}border13{/if}">
                <td style="vertical-align:middle;">
                <table style="width:100%;">
                    <tr>
                        <td style="width:5%;text-align:center;"><input type="checkbox" name="id[]" value="{$aRequest.req_id}" /></td>
                        <td style="width:30%;text-align:center;"><a href="{url link='public.user' name=$aRequest.user}">
                            {Account::Avatar sUser=$aRequest.user iSize=75 class="pic1" onmouseover="showInfo5('`$aRequest.user`', '', '');this.className='pic2';" onmouseout="this.className='pic1';return nd();"}
                            </a>
                            <br />
                        </td>
                        <td style="width:65%;vertical-align:top;font-size:8pt;" class="color"><b>{language text="username"}</b>: <a href="{url link='public.user' name=$aRequest.user}">{$aRequest.user}</a> <br />
                        <div style="padding-top:4px;"><b>{language text="gender"}</b>: {$aRequest.gender|translate:'gender'}</div>
                        <div style="padding-top:4px;"><b>{language text="age"}</b>: {$aRequest.age}</div>
                        <div style="padding:10px;">
                            <a class="link_action" href="{url link=current id=$aRequest.req_id act='approve'}">[ {language text="approve"} ]</a>
                            <a class="link_action" href="{url link=current id=$aRequest.req_id act='deny'}" onclick="return sure('{language text="are_you_sure"}');">[ {language text="deny"} ]</a>
                        </div>
                        </td>
                    </tr>
                </table>
                </td>
            </tr>
            {/foreach}
            <tr>
                <td>
                {include file="$sRootPath/_blocks/pager.html"}
                <br /><br /><br />
                <input type="submit" name="act[approve]" value="{language text="approve_selected"}"  />
                <input type="submit" name="act[deny]" value="{language text="deny_selected"}"  />
                <span style="padding-left:10px;"><a class="link_action" href="javascript:void(0);" onclick="sel();">[ {language text="check_all"} ]</a></span>
                <br />
                </td>
            </tr>
        </table>
        </form>
    </td>
    </tr>
    </table>
{else}
    <div class="message_info">{language text="there_are_no_friends_requests_yet"}</div>
{/if}